<?php Localisation::setPage('changeAccountPreferences'); ?>

<h2><?php echo Localisation::localize('title'); ?></h2>

<form action="index.php?p=changeAccountPreferences.process&backTo=changeAccountPreferences" method="post">
	<fieldset>
	<p class="text">
		<label for="newPassword">
			<?php echo Localisation::localize('new password'); ?>
		</label>
		<input type="password" name="newPassword" id="newPassword" value="" />
	</p>
	<p class="text">
		<label for="confirmNewPassword">
			<?php echo Localisation::localize('confirm new password'); ?>
		</label>
		<input type="password" name="confirmNewPassword" id="confirmNewPassword" value="" />
	</p>
	<p class="submit">
		<input type="submit" value="<?php echo Localisation::localize('confirm'); ?>" />
	</p>
	</fieldset>
</form>
<form action="index.php?p=changeAccountPreferences.process&backTo=changeAccountPreferences" method="post">
	<fieldset>
	<p class="text">
		<label for="email">
			<?php echo Localisation::localize('email'); ?>
		</label>
		<input type="email" name="email" id="email" value="<?php echo $_player->getEmail(); ?>" />
		<p class="warning">
			<?php echo Localisation::localize('email warning'); ?>
		</p>
	</p>
	<p class="selection">
		<label for="localisation">
			<?php echo Localisation::localize('localisation'); ?>
		</label>
		<select name="localisation" id="localisation">
			<?php
			foreach($_supportedLocalisations as $localisation => $label){
				?>
				<option value="<?php echo $localisation; ?>" 
				<?php 
				echo ($localisation == $_player->getLocalisation())
					? 'selected="selected"' 
					: '';
				?>>
				<?php echo $label; ?>
				</option>
				<?php	
			}
			?>
		</select>
	</p>
	<p class="selection">
		<label for="newsletterThreshold">
			<?php echo Localisation::localize('newsletter'); ?>
		</label>
		<select name="newsletterThreshold" id="newsletterThreshold">
		<?php
		foreach($_newsletterThreshold as $indice => $label){
			?>
			<option value="<?php echo $indice; ?>"
			<?php
			echo ($indice == $_player->getNewsletterThreshold())
				? 'selected="selected"' 
				: '';
			?>>
			<?php echo Localisation::localize($label); ?>
			</option>
		<?php
		}
		?>
		</select>
	</p>
	<p class="submit">
		<input type="submit" value="<?php echo Localisation::localize('confirm'); ?>" />
	</p>
	</fieldset>
</form>